package com.yao.consumer.controller;


import com.yao.dubbo.api.GreetingsService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {
    @DubboReference(version = "1.0")
    GreetingsService greetingsService;


    @GetMapping("/demo")
    public String hello(String name){
        return greetingsService.sayHi(name  );
    }

}
